-
Notifications
You must be signed in to change notification settings - Fork 2.6k
MultiDbClient implementation #3696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/active-active
Are you sure you want to change the base?
Conversation
…v-multi-db-client
self._event_dispatcher.dispatch(OnCommandFailEvent(args, e, self.active_database.client)) | ||
|
||
# Retry until failure detector will trigger opening of circuit | ||
return self.execute_command(*args, **options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we risk here to have the execution blocked on the same command for too long? The circle will open after 100 failures by default. If we have a command for which just the parsing of the response fails for some reason - it will be executed a hundred times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this part is unclear to me (how does retries should work with failure detection?) and it will be a topic on tomorrow discussion with David and other guys working on AA. I don't understand how they should be combined and what the logic is, cause if we raise an exception it might be that the process will be killed (if the app is not backed by GUnicorn, Uvicorn or Hypercorn) and we will lose a track of failures so it wouldn't work.
…ement, fixed data structure
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Added initial implementation of MultiDBClient that allows to operate on Active-Active databases